<ResourceDictionary
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

					xmlns:local="clr-namespace:SettingsView.Config"
          xmlns:conv="clr-namespace:Edi.Core.Converters;assembly=Edi.Core"
          xmlns:numUpDown="clr-namespace:NumericUpDownLib;assembly=NumericUpDownLib"
          xmlns:cmdLabel="clr-namespace:Util.Local;assembly=Util"
          >
	<Style TargetType="{x:Type local:AppConfigView}">
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:AppConfigView}">
          <ControlTemplate.Resources>
            <conv:EnumToBooleanConverter x:Key="enumConverter" />
          </ControlTemplate.Resources>
            <Border Background="{TemplateBinding Background}"
							      BorderBrush="{TemplateBinding BorderBrush}"
							      BorderThickness="{TemplateBinding BorderThickness}">

            <TabControl>
              <TabItem Header="Text Editor">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>

                <Grid Grid.Column="0">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                  </Grid.RowDefinitions>
                  <GroupBox Header="New file defaults" Grid.Row="0" Margin="9" Padding="9">
                    <Grid>
                      <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                      </Grid.RowDefinitions>

                      <CheckBox Content="Highlight content when creating new files"
                                IsChecked="{Binding HighlightOnFileNew}"
                                Grid.Row="0"
                              />

                      <StackPanel Margin="0,12" Grid.Row="1">
                        <Label Content="Default Name and extension (including '.' character):" />

                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>

                            <TextBox Text="{Binding FileNewDefaultFileName}"
                                     HorizontalAlignment="Stretch" VerticalAlignment="Top"
                                     MinWidth="150" Margin="0,3,3,0" Grid.Column="0"
                                     ToolTip="Defines the default name of a new text file"
                                  />

                            <TextBox Text="{Binding FileNewDefaultFileExtension}"
                                 HorizontalAlignment="Left" VerticalAlignment="Top"
                                 MinWidth="50" Margin="0,3" Grid.Column="1"
                                 ToolTip="Defines the default name of a new text file"
                                />

                          </Grid>
                      </StackPanel>
                      </Grid>
                  </GroupBox>

                  <!-- This option can be set but is not implemented, yet, so we hide it for now -->
                <GroupBox Header="{x:Static cmdLabel:Strings.STR_Settings_MRU_Section_Label}" Grid.Row="1" Visibility="Collapsed" Margin="9" Padding="9">
                    <StackPanel>
                      <RadioButton IsChecked="{Binding Path=MruPinSortMode, Mode=TwoWay,
                                 Converter={StaticResource enumConverter},
                                 ConverterParameter=PinnedEntriesFirst}"
                                 Content="{x:Static cmdLabel:Strings.STR_Settings_MRU_Pin_At_StartOption}"
                                 Grid.Row="0" Margin="3" />

                      <RadioButton IsChecked="{Binding Path=MruPinSortMode, Mode=TwoWay, 
                                 Converter={StaticResource enumConverter},
                                 ConverterParameter=UnsortedFavourites}"
                                 Content="{x:Static cmdLabel:Strings.STR_Settings_MRU_Pin_At_Current_Position}"
                                 Grid.Row="1" Margin="3" />
                    </StackPanel>
                  </GroupBox>

                <GroupBox Header="{x:Static cmdLabel:Strings.STR_Settings_Editor_Section_Label}" Grid.Row="1" Margin="9" Padding="9">
                    <Grid>
                      <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                      </Grid.RowDefinitions>

                      <StackPanel Grid.Row="0" Margin="0,3,0,3">
                        <CheckBox IsChecked="{Binding WordWrapText}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_WordWrap}" />

                        <StackPanel DataContext="{Binding EditorTextOptions}">
                          <CheckBox IsChecked="{Binding ShowSpaces}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_ShowSpaces}" />
                          <CheckBox IsChecked="{Binding ShowTabs}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_ShowTabs}" />
                          <CheckBox IsChecked="{Binding ShowEndOfLine}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_ShowEndOfLine}" />
                          <CheckBox IsChecked="{Binding ConvertTabsToSpaces}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_ConvertTabToSpace}" />
                          <CheckBox IsChecked="{Binding ShowBoxForControlCharacters}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_ShowBoxForControlChar}" />
                          <!-- CheckBox IsChecked="{Binding IndentationSize}" Content="Indentation size" / -->

                          <CheckBox IsChecked="{Binding CutCopyWholeLine}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_CutCopyWholeLine}" />
                          <CheckBox IsChecked="{Binding AllowScrollBelowDocument}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_AllowScrollBelowDocument}" />
                          <CheckBox IsChecked="{Binding InheritWordWrapIndentation}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_InheritWordWrapIndentation}" />
                          <CheckBox IsChecked="{Binding EnableRectangularSelection}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_EnableRectangularSelection}" />
                          <CheckBox IsChecked="{Binding EnableTextDragDrop}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_EnableTextDragDrop}" />
                          <CheckBox IsChecked="{Binding EnableVirtualSpace}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_EnableVirtualSpace}" />
                          <CheckBox IsChecked="{Binding EnableImeSupport}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_EnableImeSupport}" />
                          <CheckBox IsChecked="{Binding EnableCopyHighlighting}" Content="Copy Text with Highlighting" />
                          <CheckBox IsChecked="{Binding EnableCodeCompletion}" Content="Complete code (as you type in editor)" />
                          <CheckBox IsChecked="{Binding EnableHighlightBrackets}" Content="Highlight bracket characters &quot;&lt;([{}])>&quot;" />
                        </StackPanel>
                      </StackPanel>
                    </Grid>
                  </GroupBox>
                </Grid>

                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                  </Grid.RowDefinitions>
                  <!-- Text Document View Size Elements -->
                  <GroupBox Grid.Row="0" Grid.Column="1"
                            Header="{x:Static cmdLabel:Strings.STR_Settings_Editor_CharacterSizeSectionLabel}" Margin="9" Padding="9">
                  <StackPanel >
                    <Grid Margin="3">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                      </Grid.ColumnDefinitions>
                      <StackPanel Grid.Column="0">
                        <RadioButton IsChecked="{Binding Path=DocumentZoomUnit, Mode=TwoWay,
                                       Converter={StaticResource enumConverter},
                                       ConverterParameter=Percentage}"
                                       Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_CharacterSizeInPercent}"
                                       Grid.Row="0" Margin="3" />

                        <RadioButton IsChecked="{Binding Path=DocumentZoomUnit, Mode=TwoWay, 
                                       Converter={StaticResource enumConverter},
                                       ConverterParameter=Points}"
                                       Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_CharacterSizeInPoints}"
                                       Grid.Row="1" Margin="3" />
                      </StackPanel>
                      <Grid Grid.Column="1" Margin="15,0,3,3" HorizontalAlignment="Stretch" VerticalAlignment="Top">
                        <Grid.ColumnDefinitions>
                          <ColumnDefinition Width="*" />
                          <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                          <RowDefinition Height="Auto" />
                          <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <TextBox DataContext="{Binding SizeUnitLabel}"
                                   Text="{Binding StringValue, Mode=TwoWay,ValidatesOnDataErrors=True,UpdateSourceTrigger=PropertyChanged}"
                                   ToolTip="{Binding ValueTip}"
                                   Grid.Column="0" Grid.Row="0" MinWidth="85"
                                   VerticalAlignment="Center" HorizontalAlignment="Right"
                                   HorizontalContentAlignment="Right"/>

                        <Label DataContext="{Binding SizeUnitLabel}"
                                 Content="{Binding SelectedItem.DisplayNameShort}"
                                 ToolTip="{Binding SelectedItem.DisplayNameLong}"
                                 Grid.Column="1" Grid.Row="0" MinWidth="25"
                                 VerticalAlignment="Center" HorizontalAlignment="Left"
                                 HorizontalContentAlignment="Left" />

                        <Slider DataContext="{Binding SizeUnitLabel}"
                                  Value="{Binding Value}"
                                  Minimum="{Binding MinValue}"
                                  Maximum="{Binding MaxValue}"
                                  ToolTip="{Binding ValueTip}"
                                  Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" />
                      </Grid>
                    </Grid>
                  </StackPanel>
                  </GroupBox>

                  <StackPanel Grid.Row="1" Grid.Column="1" DataContext="{Binding EditorTextOptions}">
                    <GroupBox Header="{x:Static cmdLabel:Strings.STR_Settings_Editor_ColumnRulerSectionLabel}" Margin="9" Padding="9">
                      <Grid>
                        <Grid.ColumnDefinitions>
                          <ColumnDefinition Width="Auto" />
                          <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <CheckBox IsChecked="{Binding ShowColumnRuler}"
                                  Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_ShowColumnRulerOption}"
                                  Grid.Column="0"/>

                        <numUpDown:NumericUpDown Value="{Binding ColumnRulerPosition,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                                 MinValue="2" MaxValue="1024"
                                                 Grid.Column="1" />
                      </Grid>
                    </GroupBox>

                    <GroupBox Header="{x:Static cmdLabel:Strings.STR_Settings_Editor_Hyperlink_Section}" Margin="9" Padding="9">
                      <StackPanel>
                        <CheckBox IsChecked="{Binding EnableHyperlinks}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_ShowHyperlinks}" />
                        <CheckBox IsChecked="{Binding EnableFileHyperlinks}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_EnableFileHyperlinks}" />
                        <CheckBox IsChecked="{Binding EnableEmailHyperlinks}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_EnableEmailHyperlinks}" />
                        <CheckBox IsChecked="{Binding RequireControlModifierForHyperlinkClick}" Content="{x:Static cmdLabel:Strings.STR_Settings_Editor_RequireControlModifierForHyperlinkClick}" />
                      </StackPanel>
                    </GroupBox>
                  </StackPanel>

                  <GroupBox Grid.Row="2" Header="{x:Static cmdLabel:Strings.STR_Settings_Text2HTML_GroupHeader}" Margin="9" Padding="9">
                    <StackPanel>
                      <CheckBox IsChecked="{Binding TextToHTML_ShowLineNumbers}" Content="{x:Static cmdLabel:Strings.STR_Settings_Text2HTML_ShowLineNumbers}" />
                      <CheckBox IsChecked="{Binding TextToHTML_AlternateLineBackground}" Content="{x:Static cmdLabel:Strings.STR_Settings_Text2HTML_AlternatingBackground}" />
                    </StackPanel>
                  </GroupBox>
                </Grid>
              </Grid>
              </TabItem>

              <TabItem Header="General">
                <local:AppBehaviourConfigView HorizontalAlignment="Left" VerticalAlignment="Top" />
              </TabItem>
            </TabControl>

          </Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>